/*
 * @Descripttion: 滚动文件json
 * @version:
 * @Author: qianlishi
 * @Date: 2021-08-29 07:00:00
 * @LastEditors: qianlishi
 * @LastEditTime: 2021-09-28 14:17:39
 */
import { getJsonStr } from '@/utils/tool'
export const widgetList = {
    code: 'widget-list',
    type: 'html',
    label: '列表',
    icon: 'iconkuangjia',
    options: {
      // 配置
      setup: [
        {
          type: 'el-input-text',
          label: '图层名称',
          name: 'layerName',
          required: false,
          placeholder: '',
          value: '列表',
        },
        {
          type: 'el-switch',
          label: '组件是否显示',
          name: 'display',
          required: false,
          placeholder: '',
          value: true,
        },
        {
          type: 'el-switch',
          label: '锁定图层',
          name: 'disabled',
          required: false,
          placeholder: '',
          value: false,
        },
        {
          type: 'custom-upload',
          label: '列表图片',
          name: 'imageIcon',
          required: false,
          placeholder: '',
          value: '',
        },
        [
          {
            name: '标题设置',
            list: [
              {
                type: 'el-input-number',
                label: '文字大小',
                name: 'titleSize',
                required: false,
                placeholder: '',
                value: 16,
              },
              {
                type: 'vue-color',
                label: '文字颜色',
                name: 'titleColor',
                required: false,
                placeholder: '',
                value: '#fff',
              },
              {
                type: 'el-select',
                label: '文字粗细',
                name: 'fontWeight',
                required: false,
                placeholder: '',
                selectOptions: [
                  {code: 'normal', name: '正常'},
                  {code: 'bold', name: '粗体'},
                  {code: 'bolder', name: '特粗体'},
                  {code: 'lighter', name: '细体'}
                ],
                value: 'normal'
              },
              {
                type: 'el-input-number',
                label: '文字间距',
                name: 'letterSpacing',
                required: false,
                placeholder: '',
                value: '0',
              },
            ]
          },
        ],
        {
          type: 'custom-upload',
          label: '列表小图片',
          name: 'imageSvg',
          required: false,
          placeholder: '',
          value: '',
        },
        [
          {
            name: '小标题设置',
            list: [
              {
                type: 'el-input-number',
                label: '文字大小',
                name: 'smallSize',
                required: false,
                placeholder: '',
                value: 16,
              },
              {
                type: 'vue-color',
                label: '文字颜色',
                name: 'smallColor',
                required: false,
                placeholder: '',
                value: '#4d7ba8',
              },
              {
                type: 'el-select',
                label: '文字粗细',
                name: 'smalllFontWeight',
                required: false,
                placeholder: '',
                selectOptions: [
                  {code: 'normal', name: '正常'},
                  {code: 'bold', name: '粗体'},
                  {code: 'bolder', name: '特粗体'},
                  {code: 'lighter', name: '细体'}
                ],
                value: 'normal'
              },
              {
                type: 'el-input-number',
                label: '字体间距',
                name: 'smallLetterSpacing',
                required: false,
                placeholder: '',
                value: '0',
              },
            ]
          },
          {
            name: '点击文本设置',
            list: [
              {
                type: 'el-switch',
                label: '是否显示',
                name: 'isShow',
                required: false,
                placeholder: '',
                value: true,
              },
              {
                type: 'el-input-text',
                label: '文字内容',
                name: 'clickText',
                required: false,
                placeholder: '',
                value: '列表',
              },
              {
                type: 'el-input-number',
                label: '文字大小',
                name: 'clickSize',
                required: false,
                placeholder: '',
                value: 16,
              },
              {
                type: 'vue-color',
                label: '文字颜色',
                name: 'clickColor',
                required: false,
                placeholder: '',
                value: '#4d7ba8',
              },
              {
                type: 'el-select',
                label: '文字粗细',
                name: 'clickFontWeight',
                required: false,
                placeholder: '',
                selectOptions: [
                  {code: 'normal', name: '正常'},
                  {code: 'bold', name: '粗体'},
                  {code: 'bolder', name: '特粗体'},
                  {code: 'lighter', name: '细体'}
                ],
                value: 'normal'
              },
              {
                type: 'el-input-number',
                label: '字体间距',
                name: 'clickLetterSpacing',
                required: false,
                placeholder: '',
                value: '0',
              },
              {
                type: 'el-radio-group',
                label: '跳转方式',
                name: 'jumpMode',
                required: false,
                placeholder: '',
                selectOptions: [
                  {
                    code: 'self',
                    name: '本窗口',
                  },
                  {
                    code: 'other',
                    name: '新窗口',
                  },
                ],
                value: 'self',
              },
              {
                type: 'el-input-text',
                label: '跳转链接或路由',
                name: 'routerUrl',
                required: false,
                placeholder: '外链地址或路由',
                value: '',
              },
            ]
          },
          {
            name: '发布人设置',
            list: [
              {
                type: 'el-input-number',
                label: '文字大小',
                name: 'issuerSize',
                required: false,
                placeholder: '',
                value: 16,
              },
              {
                type: 'vue-color',
                label: '文字颜色',
                name: 'issuerColor',
                required: false,
                placeholder: '',
                value: '#4d7ba8',
              },
              {
                type: 'el-select',
                label: '文字粗细',
                name: 'issuerlFontWeight',
                required: false,
                placeholder: '',
                selectOptions: [
                  {code: 'normal', name: '正常'},
                  {code: 'bold', name: '粗体'},
                  {code: 'bolder', name: '特粗体'},
                  {code: 'lighter', name: '细体'}
                ],
                value: 'normal'
              },
              {
                type: 'el-input-number',
                label: '字体间距',
                name: 'issuerLetterSpacing',
                required: false,
                placeholder: '',
                value: '0',
              },
            ]
          },
          {
            name: '发布时间设置',
            list: [
              {
                type: 'el-input-number',
                label: '文字大小',
                name: 'timeSize',
                required: false,
                placeholder: '',
                value: 16,
              },
              {
                type: 'vue-color',
                label: '文字颜色',
                name: 'timeColor',
                required: false,
                placeholder: '',
                value: '#4d7ba8',
              },
              {
                type: 'el-select',
                label: '文字粗细',
                name: 'timelFontWeight',
                required: false,
                placeholder: '',
                selectOptions: [
                  {code: 'normal', name: '正常'},
                  {code: 'bold', name: '粗体'},
                  {code: 'bolder', name: '特粗体'},
                  {code: 'lighter', name: '细体'}
                ],
                value: 'normal'
              },
              {
                type: 'el-input-number',
                label: '字体间距',
                name: 'timeLetterSpacing',
                required: false,
                placeholder: '',
                value: '0',
              },
            ]
          },
        ],
        {
          type: 'dynamic-add-list',
          label: '',
          name: 'dynamicAddList',
          required: false,
          placeholder: '',
          value: [
            {name: '标题', key: 'title', width: 1},
            {name: '小标题', key: 'local', width: 1},
            {name: '发布人',key: 'pople',width: 1},
            {name: '发布时间',key: 'time',width: 1}
          ]
        }
      ],
      // 数据
      data: [
        {
          type: 'el-radio-group',
          label: '数据类型',
          name: 'dataType',
          require: false,
          placeholder: '',
          selectValue: true,
          selectOptions: [
            {
              code: 'staticData',
              name: '静态数据',
            },
            {
              code: 'dynamicData',
              name: '动态数据',
            },
          ],
          value: 'staticData',
        },
        {
          type: 'el-input-number',
          label: '刷新时间(毫秒)',
          name: 'refreshTime',
          relactiveDom: 'dataType',
          relactiveDomValue: 'dynamicData',
          value: 0
        },
        {
          type: 'el-button',
          label: '静态数据',
          name: 'staticData',
          required: false,
          placeholder: '',
          relactiveDom: 'dataType',
          relactiveDomValue: 'staticData',
          value: getJsonStr([
            {
              "title": "标题",
              "local": "小标题",
              "pople": "发布人",
              "time": "2021-01-03 15:04:34"
            },
            {
              "title": "标题",
              "local": "小标题",
              "pople": "发布人",
              "time": "2021-01-03 15:04:34"
            }
          ]),
        },
        {
          type: 'dycustComponents',
          label: '',
          name: 'dynamicData',
          required: false,
          placeholder: '',
          relactiveDom: 'dataType',
          relactiveDomValue: 'dynamicData',
          chartType: 'widget-text',
          dictKey: 'TEXT_PROPERTIES',
          value: {
            url: '',
            dataMethod: '',
            dataParams: getJsonStr({}),
          },
        }
      ],
      // 坐标
      position: [
        {
          type: 'el-input-number',
          label: '左边距',
          name: 'left',
          required: false,
          placeholder: '',
          value: 0,
        },
        {
          type: 'el-input-number',
          label: '上边距',
          name: 'top',
          required: false,
          placeholder: '',
          value: 0,
        },
        {
          type: 'el-input-number',
          label: '宽度',
          name: 'width',
          required: false,
          placeholder: '该容器在1920px大屏中的宽度',
          value: 600,
        },
        {
          type: 'el-input-number',
          label: '高度',
          name: 'height',
          required: false,
          placeholder: '该容器在1080px大屏中的高度',
          value: 156,
        },
        {
          type: 'el-input-number',
          label: '层级',
          name: 'zIndex',
          required: false,
          placeholder: '该容器在大屏中的层级',
          value: 0
        },
      ],
    }
  }